package cn.zdh.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class JDBCUtil {
    public static Connection getConnect() throws Exception {
        String driver = "com.mysql.jdbc.Driver";
        String url = "jdbc:mysql:///spring_data";
        String user = "root";
        String password = "1314156";
        Class.forName(driver);
        Connection connection = DriverManager.getConnection(url, user, password);
        return connection;
    }
}
